package com.drojian.demo3.dataStorage.room;

import androidx.room.ColumnInfo;
import androidx.room.Entity;
import androidx.room.PrimaryKey;

@Entity
public class Word {
    @PrimaryKey(autoGenerate = true) // 将id设置为主键，并且自增
    private int id;
    @ColumnInfo(name = "English")   // 设置每列的名称
    private String English_word;
    @ColumnInfo(name = "Chinese")
    private String Chinese_meaning;
    // 主键不用构造函数
    public  Word(){}
    public Word(String english_word, String chinese_meaning) {
        English_word = english_word;
        Chinese_meaning = chinese_meaning;
    }
    public void setId(int id){
        this.id = id;
    }
    public int getId() {
        return id;
    }
    public String getEnglish_word() {
        return English_word;
    }

    public void setEnglish_word(String english_word) {
        English_word = english_word;
    }

    public String getChinese_meaning() {
        return Chinese_meaning;
    }

    public void setChinese_meaning(String chinese_meaning) {
        Chinese_meaning = chinese_meaning;
    }
}
